<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/jquery-3.4.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/wang/wangEditor.js"></script>
</head>
<body>

<div id="editor"></div>
<button id="btnSave">提交</button>

<script>
    var E = window.wangEditor
    var editor2 = new E('#editor')
    editor2.customConfig.uploadImgServer = '/upload-img'
    editor2.create()
    // 设置内容
    editor2.txt.html('<p>1706A，都是帅哥美女！</p>')

    $("#btnSave").click(function () {
        var content = editor2.txt.html();
        console.log(content);

        var c1 = editor2.txt.text();
        console.log(c1);

    });
</script>
</body>
</html>